<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='UTF-8'>
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
<title>02v-text</title>
</head>
<body>

  <div id='app'>
    <div>{{msg}}</div>
    <div v-text="msg"></div>
    <hr>
    <div>{{richTxt}}</div>
    <div v-text="richTxt"></div>
  </div>

<script src='https://cdn.bootcdn.net/ajax/libs/vue/2.6.12/vue.js'></script>
<script>
  const app = new Vue({
    el: '#app'
    ,data:{
      msg: '上课不要睡觉，同学会以为你猝死了'
      ,richTxt: `
        <h1 style="color:blue;">富文本数据</h1>
      `
    }
  })
</script>
</body>
</html>